/*
 * Copyright (c) 2025 Industrial Software Feature Database
 */
package com.comac.ins.bomt.service;

import com.comac.ins.bomt.common.enums.BomDetailTypeEnum;
import com.comac.ins.bomt.domain.*;
import com.comac.ins.bomt.domain.vo.*;
import com.comac.ins.common.core.domain.model.LoginUser;
import com.comac.ins.common.mybatis.core.page.PageQuery;
import com.comac.ins.common.mybatis.core.page.TableDataInfo;

import java.util.List;

/**
 * Bom查询服务.
 * 原则上所有Bom相关的查询操作均需要使用此层
 *
 * @author zhanghongyi
 * @date 2024 /8/6 16:30
 * @description BomQueryService
 */
public interface BomQueryService {

    /**
     * 查询原始装机清单文件列表.
     *
     * @param loginUser     the login user
     * @param aircraftModel the aircraft model
     * @param pageQuery     the page query
     * @return the table data info
     */
    TableDataInfo<BizFileVo> listOriginalByPage(LoginUser loginUser, String aircraftModel, PageQuery pageQuery);

    /**
     * 根据明细类型查询可用的批次号.
     *
     * @param loginUser     the login user
     * @param aircraftModel the aircraft model
     * @param detailType    the detail type
     * @param pageQuery     the page query
     * @return the table data info
     */
    TableDataInfo<String> listTrackByPage(LoginUser loginUser, String aircraftModel, BomDetailTypeEnum detailType, PageQuery pageQuery);

    /**
     * 根据明细类型查询可用的批次号.
     *
     * @param loginUser     the login user
     * @param aircraftModel the aircraft model
     * @param detailType    the detail type
     * @param pageQuery     the page query
     * @return the table data info
     */
    TableDataInfo<TrackInfoVo> listTrackInfoByPage(LoginUser loginUser, String aircraftModel, BomDetailTypeEnum detailType, PageQuery pageQuery);

    /**
     * 查询Bom列表.
     *
     * @param loginUser     the login user
     * @param aircraftModel the aircraft model
     * @param batchNo       the batch no
     * @param detailType    明细类型
     * @param pageQuery     the page query
     * @return the table data info
     */
    TableDataInfo<BomInfoVo> listBomByPage(LoginUser loginUser, String aircraftModel, String batchNo, BomDetailTypeEnum detailType, PageQuery pageQuery);

    /**
     * 查询标准装机清单明细.
     *
     * @param loginUser     the login user
     * @param aircraftModel the aircraft model
     * @param track         the track
     * @param groupType     the group type
     * @param query         标准装机清单查询请求
     * @param pageQuery     the page query
     * @return the table data info
     */
    TableDataInfo<DetailStandardBomVo> listStandardBomDetailByPage(LoginUser loginUser, String aircraftModel, String track, String groupType, DetailStandardBomVo query, PageQuery pageQuery);


    /**
     * 分页查询跨track强度清单明细详情
     *
     * @param loginUser     the login user
     * @param query         the query
     * @param pageQuery     the page query
     * @return the table data info
     */
    TableDataInfo<DetailStrengthBomVo> listStrengthCrossTrackDetailByPage(LoginUser loginUser,  DetailStrengthBomVo query , PageQuery pageQuery);

    /**
     * 查询强度数模清单明细.
     *
     * @param loginUser     the login user
     * @param aircraftModel the aircraft model
     * @param track         the track
     * @param groupType     the group type
     * @param query         the query
     * @param pageQuery     the page query
     * @return the table data info
     */
    TableDataInfo<DetailStrengthBomVo> listStrengthBomDetailByPage(LoginUser loginUser, String aircraftModel, String track, String groupType, DetailStrengthBomVo query, PageQuery pageQuery);

    /**
     * 查询强度数模清单Vs标准装机清单对比明细
     *
     * @param loginUser     the login user
     * @param aircraftModel the aircraft model
     * @param track         the track
     * @param groupType     the group type
     * @param query         查询请求
     * @param pageQuery     the page query
     * @return the table data info
     */
    TableDataInfo<DetailStrengthStandardChangeVo> listStrengthVsStandardChangeDetailByPage(LoginUser loginUser, String aircraftModel, String track, String groupType, DetailStrengthStandardChangeVo query, PageQuery pageQuery);

    /**
     * 查询模型状态清单Vs强度数模清单明细
     *
     * @param loginUser     the login user
     * @param aircraftModel the aircraft model
     * @param track         the track
     * @param groupType     the group type
     * @param query         the query
     * @param pageQuery     the page query
     * @return the table data info
     */
    TableDataInfo<DetailStatusStrengthChangeVo> listStatusVsStrengthChangeDetailByPage(LoginUser loginUser, String aircraftModel, String track, String groupType, DetailStatusStrengthChangeVo query, PageQuery pageQuery);

    /**
     * 查询所有标准装机清单明细
     *
     * @param bomInfo the bom info
     * @return the list
     */
    List<DetailStandardBom> queryStandardBomDetailsByBomInfo(BomInfo bomInfo);

    /**
     * 查询所有强度数模清单明细
     *
     * @param bomInfo the bom info
     * @return the list
     */
    List<DetailStrengthBom> queryStrengthBomDetailsByBomInfo(BomInfo bomInfo);

    /**
     * 查询所有模型状态清单明细
     *
     * @param bomInfo the bom info
     * @return the list
     */
    List<DetailModelStatus> queryModelStatusDetailsByBomInfo(BomInfo bomInfo);

    /**
     * 查询所有强度数模清单Vs标准装机清单对比明细
     *
     * @param bomInfo the bom info
     * @return the list
     */
    List<DetailStrengthStandardChange> queryStrengthStandardChangeDetailsByBomInfo(BomInfo bomInfo);

    /**
     * 查询所有模型状态清单Vs强度数模清单对比明细
     *
     * @param bomInfo the bom info
     * @return the list
     */
    List<DetailStatusStrengthChange> queryStatusStrengthChangeDetailsByBomInfo(BomInfo bomInfo);

    /**
     * 根据Id查询BomInfo
     *
     * @param bomId the bom id
     * @return the bom info by id
     */
    BomInfo getBomInfoById(Long bomId);

    /**
     * 根据Id列表批量查询BomInfo
     *
     * @param bomIdList the bom id list
     * @return the bom info by ids
     */
    List<BomInfo> getBomInfoByIds(List<Long> bomIdList);

    /**
     * 根据机型，批次号，分组类型查询Bom信息
     *
     * @param aircraftModel the aircraft model
     * @param track         the track
     * @param groupType     the group type
     * @return the bom info by model track and group type
     */
    BomInfo getBomInfoByModelTrackAndGroupType(String aircraftModel, String track, String groupType);

    /**
     * 根据批次号和机型查询BomInfo列表
     *
     * @param aircraftModel the aircraft model
     * @param track         the track
     * @return the bom info list by model track
     */
    List<BomInfo> getBomInfoListByModelTrack(String aircraftModel, String track);
}
